<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS过度</title>
    <style>
        div {
            width: 150px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            border-radius: 5px;
            color: black;
            background-color: silver;
            transition: all 1s linear;
        }
        div:hover{
            color: white;
            background-color:#45b823;
        }
    </style>
</head>
<body>
    <div>Web前端开发</div>
</body>
</html>